package sctu.edu.java.year2016.team07.nieying.practice.dijiuzhang;

/**
 * Created by Administrator on 2016/5/29 0029.
 */
public class Text {
    static String staticster="静态的变量";
    String str="非静态的变量";
    public static void text1(){
        System.out.println("静态方法");
    }
    public void text2(){
        System.out.println("非静态的方法");
    }
}
class Run{
    public static void main(String[] args) {
        Text.text1();//无需实例化就可以调用到方法
        System.out.println(Text.staticster);
        Text test = new Text();
        test.text2();//需要实例化之后才能够调用的得到
        System.out.println(test.str);
    }
}
